<template>
    <div>
        <h1>登录</h1>
        <input type="text" placeholder="用户名" v-model="user.name"/> <br/>
        <input type="password" placeholder="密码" v-model="user.password"/><br/>
        <button @click="$store.dispatch('login',user)">登录</button>
    </div>
</template>
<script setup>
import {reactive} from 'vue';
const user = reactive({
    name:'',
    password:'',
})
</script>